import axiosData from "@/api/axios";

export default {
  /**
     * @description: 查询工况设备
     * @param {String/Number} page *
     * @param {String/Number} size *
     * @param {Object} entity {} *
     * @return {Array}
     */
  queryOperationEquipments(params) {
    return axiosData.post("/v3/agricultural-equipment/v1/equipment/queryPageList", params);
  },
  queryOperationEquipment(params) {
    return axiosData.post('/v3/agricultural-equipment/v1/equipment/queryPageListByProcess',params)
  },
  /**
   * @description: 查询设备数据项的最新数据 *代表必填
   * @param {String} equipmentCode  *
   * @return {Array}
   */
  queryAllLatestData(params) {
    return axiosData.get(`/v3/equipment-monitor/v1/equDataItem/queryAllLatestData?equipmentCode=${params}`);
  },
  /**
   * @description:查询设备所有关联数据项
   * @param {String} equipmentCode  *
   * @return {Array}
   */
  queryDataItem(params) {
    return axiosData.get(`/v3/equipment-monitor/v1/equDataItem/queryDataItem?equipmentCode=${params}`);
  },
  /**
   * @description:查询该数据项历史数据
   * @param {Number}   dataItemId*
   * @param {String}   startTime*
   * @param {String}   endTime*
   * @return {Array}
   */
  queryHistory(params) {
    return axiosData.get(`/v3/equipment-monitor/v1/equDataItem/queryHistory?dataItemId=${params.dataItemId}&startTime=${params.startTime}&endTime=${params.endTime}`);
  },
  queryImg(params) {
    return axiosData.get(`/v3/equipment-ledger/v1/equipmentPicture/getPictureByEquipmentCode?equipmentCode=${params.equipmentCode}`)
  }

};
